<%@page import="java.lang.reflect.*"%>
<%@page import="models.DomainModel"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Set"%>
<%@page import="java.util.TreeMap"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<style type="text/css">
ul li span {
	display: table-cell;
	vertical-align: middle;
}

ul li img {
	width: 18px;
}

.txt-msg {
	width: 350px;
}
.ico-msg {
	
}
</style>
</head>
<body>
<%
	TreeMap check = (TreeMap) request.getAttribute("check");
	DomainModel domain = (DomainModel) request.getAttribute("domain");
%>

<h2>Get Domain service</h2>

<ul>
	<li>
		<span class="txt-msg">Get info server</span>
		<span class="ico-msg">
		<% if (check.get("fDomain") == null && check.get("server") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %>
		</span> 
	</li>
	<li>
		<span class="txt-msg">Get site info (title, keywords, description) </span>
		<span class="ico-msg">
		<% if (check.get("fDomain") == null && check.get("siteinfo") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %>
		</span>
	</li>
	<li>
		<span class="txt-msg">Get google analytic </span>
		<span class="ico-msg">
		<% if (check.get("fDomain") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %>
		</span>
	</li>
	<li>
		<span class="txt-msg">Get google adsence </span>
		<span class="ico-msg">
		<% if (check.get("fDomain") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %>
		</span>
	</li>
	<li>
		<span class="txt-msg">Get javascript library </span>
		<span class="ico-msg">
		<% if (check.get("fDomain") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
	<li>
		<span class="txt-msg">Inlink Site </span>
		<span class="ico-msg">
		<% if (check.get("fDomain") == null && check.get("inlink") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
	<li>
		<span class="txt-msg">Get whois </span>
		<span class="ico-msg">
		<% if (check.get("fWhois") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
	<li>
		<span class="txt-msg">Get ip address </span>
		<span class="ico-msg">
		<% if (check.get("fIpAddress") == null && check.get("ipAddress") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
	<li>
		<span class="txt-msg">Get alexa rank, daily visit, country visit </span>
		<span class="ico-msg">
		<% if (check.get("fAlexa") == null && (check.get("alexaRank") == null || check.get("dailyVisitor") == null || check.get("countryVisitor") == null)) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
	<li>
		<span class="txt-msg">Get google Page Rank </span>
		<span class="ico-msg">
		<% if (check.get("googlePageRank") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
	<li>
		<span class="txt-msg">Get age Domain </span>
		<span class="ico-msg">
		<% if (check.get("age") == null || check.get("fAgeDomain") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
	<li>
		<span class="txt-msg">Get HTML validator </span>
		<span class="ico-msg">
		<% if (check.get("fValidator") == null || check.get("validator") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
	<li>
		<span class="txt-msg">Get site same google analytic and google adsence </span>
		<span class="ico-msg">
		<% if (check.get("fGoogleService") == null || check.get("googleService") == null) { %>
			<img src="/images/valid.png"/>
		<% } else { %>
			<img src="/images/error.png"/>
		<% } %> 
		</span>
	</li>
</ul>
------------------------------------------------------------- 
<br />
<%
try {
	for (Field f : domain.getClass().getDeclaredFields()) {
		f.setAccessible(true);
		%>
		<b style="color: red;"><%=f.getName() %></b>: <%=f.get(domain) %> <br />
		
		<%
	}
} catch (Exception e) {
	e.printStackTrace();
}
%>
<br />
-------------------------------------------------------------
<br />
<%
//Get a set of the entries 
Set set = check.entrySet(); 
// Get an iterator 
Iterator i = set.iterator(); 
// Display elements 
while(i.hasNext()) { 
	Map.Entry me = (Map.Entry)i.next(); 
	%>
	<div style="color: red"><%=me.getKey() %>: <%=me.getValue() %></div>
<% 
} 
%>
</body>
</html>